<template>
	<Container>
		<view class="header">
			<view class="article-box" v-for="(article, index) in assignment.articles" :key="index">
				<image class="comparedArticle img" :class="{ articleLight: speakCurrent === index }" :src="article.imageUrl" mode="aspectFit"></image>
			</view>
			<AudioIcon @iconTap="iconTap" :questionPress="questionPress" />
		</view>
		<Question :question="questionWord" />
		<Record class="record" ref="audio" @recordFinish="recordFinish" :isStart="questionPress" :answerText="assignment.answerTexts" :typeCode="assignment.typeCode" />
	</Container>
</template>

<script>
import { mixins } from '../../../common/mixins/assignmentDefault.js'
import { articleSpeak } from '../../../common/mixins/assignmentArticleSpeak.js'
import AudioIcon from '../audioIcon.vue'
import Question from '../questionName.vue'
import Container from '../container.vue'
import Record from '../record.vue'
export default {
	components: { AudioIcon, Question, Container, Record },
	mixins: [mixins, articleSpeak]
}
</script>

<style scoped lang="stylus">
.header
	height 50vh
	width 720rpx
	border-radius 70rpx
	border 12rpx solid #FCC77D
	background white
	box-sizing border-box
	display flex
	align-items center
	justify-content center
	margin 5vh 0
	position relative
	.article-box
		width 35%
		height 60%
		margin 0 5%
		.comparedArticle
			width 100%
			height 100%
</style>
